package com.dragon.modules.yuegou.query.coupon;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.coupon.ShelfPlanEntity;
import com.dragon.modules.yuegou.enums.coupon.ShelfPlanStatus;
import com.dragon.modules.yuegou.enums.coupon.ShelfPlanType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 优惠券上架计划 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-02-28 18:30:18
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ShelfPlanQuery extends ShelfPlanEntity implements Query<ShelfPlanEntity> {

    /** 计划ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 优惠券模板ID查询条件 */
	@JsonUnwrapped(prefix = "couponTemplateId")
	private Condition<String> couponTemplateIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "couponPackageTemplateId")
	private Condition<String> couponPackageTemplateIdCondition;

    /** 上架开始时间查询条件 */
	@JsonUnwrapped(prefix = "startTime")
	private Condition<LocalDateTime> startTimeCondition;

    /** 上架结束时间查询条件 */
	@JsonUnwrapped(prefix = "endTime")
	private Condition<LocalDateTime> endTimeCondition;

    /** 状态查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<ShelfPlanStatus> statusCondition;

    /** 计划类型查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<ShelfPlanType> typeCondition;

    /** 创建者查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改人查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 是否删除（1：已删除，0：未删除）查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ShelfPlanQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ShelfPlanQuery(ShelfPlanEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ShelfPlanQuery(ShelfPlanQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.couponTemplateIdCondition != null) {
			this.couponTemplateIdCondition = other.couponTemplateIdCondition.copy();
		}
		if(other.couponPackageTemplateIdCondition != null) {
			this.couponPackageTemplateIdCondition = other.couponPackageTemplateIdCondition.copy();
		}
		if(other.startTimeCondition != null) {
			this.startTimeCondition = other.startTimeCondition.copy();
		}
		if(other.endTimeCondition != null) {
			this.endTimeCondition = other.endTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ShelfPlanEntity> toQueryWrapper() {
		QueryWrapper<ShelfPlanEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (couponTemplateIdCondition != null) {
			couponTemplateIdCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE_ID);
		}
		if (couponPackageTemplateIdCondition != null) {
			couponPackageTemplateIdCondition.toWrapper(wrapper, COL_COUPON_PACKAGE_TEMPLATE_ID);
		}
		if (startTimeCondition != null) {
			startTimeCondition.toWrapper(wrapper, COL_START_TIME);
		}
		if (endTimeCondition != null) {
			endTimeCondition.toWrapper(wrapper, COL_END_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回计划ID查询条件
	 * 
	 * @return idCondition 计划ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取计划ID查询条件
	 * 
	 * @return idCondition 计划ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置计划ID查询条件
	 * 
	 * @param idCondition 计划ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回优惠券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 优惠券模板ID查询条件
	 */
	public Condition<String> couponTemplateId() {
		this.couponTemplateIdCondition = new Condition<>();
		return this.couponTemplateIdCondition;
	}
	
	/**
	 * 获取优惠券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 优惠券模板ID查询条件
	 */
	public Condition<String> getCouponTemplateIdCondition() {
		return couponTemplateIdCondition;
	}

	/**
	 * 设置优惠券模板ID查询条件
	 * 
	 * @param couponTemplateIdCondition 优惠券模板ID查询条件
	 */
	public void setCouponTemplateIdCondition(Condition<String> couponTemplateIdCondition) {
		this.couponTemplateIdCondition = couponTemplateIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return couponPackageTemplateIdCondition 查询条件
	 */
	public Condition<String> couponPackageTemplateId() {
		this.couponPackageTemplateIdCondition = new Condition<>();
		return this.couponPackageTemplateIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return couponPackageTemplateIdCondition 查询条件
	 */
	public Condition<String> getCouponPackageTemplateIdCondition() {
		return couponPackageTemplateIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param couponPackageTemplateIdCondition 查询条件
	 */
	public void setCouponPackageTemplateIdCondition(Condition<String> couponPackageTemplateIdCondition) {
		this.couponPackageTemplateIdCondition = couponPackageTemplateIdCondition;
	}

	/**
	 * 构造并返回上架开始时间查询条件
	 * 
	 * @return startTimeCondition 上架开始时间查询条件
	 */
	public Condition<LocalDateTime> startTime() {
		this.startTimeCondition = new Condition<>();
		return this.startTimeCondition;
	}
	
	/**
	 * 获取上架开始时间查询条件
	 * 
	 * @return startTimeCondition 上架开始时间查询条件
	 */
	public Condition<LocalDateTime> getStartTimeCondition() {
		return startTimeCondition;
	}

	/**
	 * 设置上架开始时间查询条件
	 * 
	 * @param startTimeCondition 上架开始时间查询条件
	 */
	public void setStartTimeCondition(Condition<LocalDateTime> startTimeCondition) {
		this.startTimeCondition = startTimeCondition;
	}

	/**
	 * 构造并返回上架结束时间查询条件
	 * 
	 * @return endTimeCondition 上架结束时间查询条件
	 */
	public Condition<LocalDateTime> endTime() {
		this.endTimeCondition = new Condition<>();
		return this.endTimeCondition;
	}
	
	/**
	 * 获取上架结束时间查询条件
	 * 
	 * @return endTimeCondition 上架结束时间查询条件
	 */
	public Condition<LocalDateTime> getEndTimeCondition() {
		return endTimeCondition;
	}

	/**
	 * 设置上架结束时间查询条件
	 * 
	 * @param endTimeCondition 上架结束时间查询条件
	 */
	public void setEndTimeCondition(Condition<LocalDateTime> endTimeCondition) {
		this.endTimeCondition = endTimeCondition;
	}

	/**
	 * 构造并返回状态查询条件
	 * 
	 * @return statusCondition 状态查询条件
	 */
	public Condition<ShelfPlanStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取状态查询条件
	 * 
	 * @return statusCondition 状态查询条件
	 */
	public Condition<ShelfPlanStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置状态查询条件
	 * 
	 * @param statusCondition 状态查询条件
	 */
	public void setStatusCondition(Condition<ShelfPlanStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回计划类型查询条件
	 * 
	 * @return typeCondition 计划类型查询条件
	 */
	public Condition<ShelfPlanType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取计划类型查询条件
	 * 
	 * @return typeCondition 计划类型查询条件
	 */
	public Condition<ShelfPlanType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置计划类型查询条件
	 * 
	 * @param typeCondition 计划类型查询条件
	 */
	public void setTypeCondition(Condition<ShelfPlanType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回创建者查询条件
	 * 
	 * @return createdByCondition 创建者查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建者查询条件
	 * 
	 * @return createdByCondition 创建者查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建者查询条件
	 * 
	 * @param createdByCondition 创建者查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置修改人查询条件
	 * 
	 * @param modifiedByCondition 修改人查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回是否删除（1：已删除，0：未删除）查询条件
	 * 
	 * @return delCondition 是否删除（1：已删除，0：未删除）查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取是否删除（1：已删除，0：未删除）查询条件
	 * 
	 * @return delCondition 是否删除（1：已删除，0：未删除）查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置是否删除（1：已删除，0：未删除）查询条件
	 * 
	 * @param delCondition 是否删除（1：已删除，0：未删除）查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人查询条件
	 * 
	 * @param delByCondition 删除人查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
